#ifndef QUEUES_H
#define QUEUES_H
#include"list.h"

static inline int queues_size(struct list_head* que)
{
    int i=0;
    struct list_head *temp;
    list_for_each(temp,que)i++;
    return i;
}

static inline bool queues_isempty(struct list_head* que)
{
    return list_empty(que);
}
//返回第一个元素
static inline struct list_head *queues_pop(struct list_head* que)
{
    if(queues_isempty(que))return NULL;
    struct list_head*temp=que->next;
    list_del(temp);
    return temp;
}
static inline void queues_push(struct list_head* que,struct list_head* data)
{
    list_add_tail(data,que);
}


#endif // QUEUES_H
